#pragma once
#ifdef FAXUSBMANAGER_EXPORTS
#define FAXUSBMANAGER_API __declspec(dllexport)
#else
#define FAXUSBMANAGER_API __declspec(dllimport)
#endif
#include "faxBackupUsbManagerCommon.h"


class FAXUSBMANAGER_API RegisterAppInfo
{
public:
	RegisterAppInfo(void);
	virtual ~RegisterAppInfo(void);
	char m_appInstallPath[MAX_PATH];
	char m_appExePath[MAX_PATH];
	char m_recoverLinkPathName[MAX_PATH];
	char m_deviceSerialNum[TAX_DEVICE_SERIAL_LENGTH];
	char m_appKeyName[FAX_APP_NAME_LENGTH];

	virtual void SetAppInstallPath(char *appInstallPath);
	virtual void SetAppExePath(char *appExePath);
	virtual void SetRecoverLinkPathName(char *recoverLinkPathName);
	virtual void SetDeviceSerialNum(char *deviceSerialNum);
	virtual void SetAppKeyName(char *appKeyName);
	virtual BOOL InitByString(char* line);
	virtual BOOL SameSerialNum(char *serialNum);
	//BOOL CopyToLine(char *line, int bufferLen);
};

//extern FAXUSBMANAGER_API void Test();
extern "C" FAXUSBMANAGER_API RegisterAppInfo *CreateRegisterAppInfoObject();
extern "C" FAXUSBMANAGER_API BOOL InitAppRegisterInfo();
extern "C" FAXUSBMANAGER_API BOOL GetAndRemoveFirstAppRegisterInfo(char *serialNum, char *exePath, char *lnkPathName);
extern  "C" FAXUSBMANAGER_API BOOL GetAppRegisterInfoByExePath( char *exePath, RegisterAppInfo &info );
extern  "C" FAXUSBMANAGER_API BOOL GetAppRegisterInfoByinstallPath( char *installPath, RegisterAppInfo &info );
extern  "C" FAXUSBMANAGER_API BOOL AddAppRegisterInfo( const RegisterAppInfo info );
extern "C"  FAXUSBMANAGER_API BOOL SaveAppRegisterInfo();
extern "C"  FAXUSBMANAGER_API void DeleteRegisterFile();
extern FAXUSBMANAGER_API BOOL RemoveAppRegisterInfo(char *exePath);